cmake_minimum_required(VERSION 3.20)

cmake_host_system_information(RESULT hostname QUERY HOSTNAME)
cmake_host_system_information(RESULT fqdn QUERY FQDN)
message(STATUS "hostname:${hostname}")
message(STATUS "FQDN:${fqdn}")

cmake_host_system_information(RESULT logical QUERY NUMBER_OF_LOGICAL_CORES)
cmake_host_system_information(RESULT physical QUERY NUMBER_OF_PHYSICAL_CORES)
message(STATUS "logical cores:${logical}")
message(STATUS "phycial cores:${physical}")

cmake_host_system_information(RESULT total_mem QUERY TOTAL_PHYSICAL_MEMORY)
cmake_host_system_information(RESULT avail_mem QUERY AVAILABLE_PHYSICAL_MEMORY)
message(STATUS "total memeory:${total_mem}")
message(STATUS "available memeory:${avail_mem}")

cmake_host_system_information(RESULT is_64 QUERY IS_64BIT)
message(STATUS "Is 64bit:${is_64}")

cmake_host_system_information(RESULT os_name QUERY OS_NAME)
cmake_host_system_information(RESULT os_version QUERY OS_VERSION)
cmake_host_system_information(RESULT os_platform QUERY OS_PLATFORM)
cmake_host_system_information(RESULT os_release QUERY OS_RELEASE)

message(STATUS "OS_Name:${os_name}")
message(STATUS "OS_Version:${os_version}")
message(STATUS "OS_Platform:${os_platform}")
message(STATUS "OS_Release:${os_release}")
